﻿<phone:PhoneApplicationPage
    x:Class="UtilityApp.TwitterPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <Grid>
        <phone:Pivot Title="Twitter">
            <phone:Pivot.Background>
                <ImageBrush Stretch="Fill" ImageSource="/Images/800x480.jpg"/>
            </phone:Pivot.Background>
            <phone:PivotItem Header="Web">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="0.8*"/>
                        <RowDefinition Height="0.2*"/>
                    </Grid.RowDefinitions>
                    <phone:WebBrowser x:Name="twitterBrowser" 
                                      Grid.Row="0" IsScriptEnabled="True"/>
                    <StackPanel Grid.Row="1" 
                                Orientation="Horizontal" HorizontalAlignment="Center">
                        <Button x:Name="btnGo" 
                                Content="Go" 
                                VerticalAlignment="Top" 
                                HorizontalAlignment="Center"
                                Click="btnGo_Click"
                                />
                        <Button Content="Refresh" 
                                x:Name="btnRefresh"
                                VerticalAlignment="Top"
                                Click="btnRefresh_Click"
                                />
                    </StackPanel>
                </Grid>
            </phone:PivotItem>
            <phone:PivotItem Header="Template">
                <Grid>
                    <phone:LongListSelector x:Name="twitterLongList" 
                                            ItemTemplate="{StaticResource TwitterPostTemplate}"/>
                </Grid>
            </phone:PivotItem>
        </phone:Pivot>
    </Grid>

</phone:PhoneApplicationPage>